//继承 Thread, 重写 run
class myThread extends Thread{
    @Override
    public void run(){

    }
}
//实现 Runnable, 重写 run
class myRunnable implements Runnable{
    @Override
    public void run(){

        }
}
public class Homework2 {
    public static void main(String[] args) {
        //继承 Thread, 重写 run
        Thread t1 = new Thread(new myThread());
        //实现 Runnable, 重写 run
        Thread t2 = new Thread(new myRunnable());
        //继承 Thread, 重写 run, 使用匿名内部类
        Thread t3 = new Thread(){
            @Override
            public void run(){

            }
        };
        //实现 Runnable, 重写 run, 使用匿名内部类
        Thread t4 = new Thread(new Runnable(){
            @Override
            public void run() {

            }
        });
        //使用 lambda 表达式
        Thread t5 = new Thread(()->{

        });
    }
}
